package com.example.service.impl;

import com.example.dao.OrdersDao;
import com.example.entity.Orders;
import com.example.entity.OrdersDetail;
import com.example.service.OrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrdersServiceImpl implements OrdersService {
    @Autowired
    private OrdersDao ordersDao;
    @Override
    public boolean addOrders(Orders orders) {
        return ordersDao.addOrders(orders)>0;
    }

    @Override
    public List<Orders> getAllOrdersByUid(int uid) {
        return ordersDao.getAllOrdersByUid(uid);
    }

    @Override
    public Orders getAllOrdersByOid(int oid) {
        return ordersDao.getAllOrdersByOid(oid);
    }
}
